/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f7f8fa;
  color: #333;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, li {
  list-style: none;
}

.container {
  width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: all 0.3s;
}

.card:hover {
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

/* 文章卡片样式 */
.article-card {
  margin-bottom: 20px;
  cursor: pointer;
}

.article-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-summary {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.article-meta {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #999;
}

.article-meta > span {
  margin-right: 15px;
  display: flex;
  align-items: center;
}

.article-meta .icon {
  margin-right: 3px;
}

/* 头部导航栏样式 */
.header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding: 0 20px;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  color: #333;
}

.logo span {
  color: #409eff;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-item {
  margin: 0 15px;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  transition: color 0.3s;
}

.nav-item.active, .nav-item:hover {
  color: #409eff;
}

.search-box {
  margin-right: 20px;
}

/* 分类标签样式 */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.category-tag {
  padding: 6px 12px;
  border-radius: 16px;
  margin-right: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.category-tag.active {
  background-color: #409eff;
  color: #fff;
}

.category-tag:not(.active) {
  background-color: #eef2fd;
  color: #409eff;
}

.category-tag:hover:not(.active) {
  background-color: #e3eafb;
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
  .container {
    width: 100%;
    padding: 15px;
  }
}

@media screen and (max-width: 768px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
}

/* 动画效果 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* 页面内容区样式 */
.page-content {
  min-height: calc(100vh - 60px - 60px);
  padding: 20px 0;
}

/* 底部版权样式 */
.footer {
  background-color: #f2f3f5;
  color: #666;
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}

/* 详情页样式 */
.detail-content {
  padding: 25px;
}

.detail-header {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.detail-title {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.4;
}

.detail-meta {
  display: flex;
  align-items: center;
  color: #999;
  font-size: 14px;
  margin-bottom: 10px;
}

.detail-author {
  display: flex;
  align-items: center;
  margin-right: 20px;
}

.author-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
}

.detail-body {
  line-height: 1.8;
  font-size: 16px;
  color: #333;
}

.detail-body img {
  max-width: 100%;
  margin: 15px 0;
  border-radius: 4px;
}

.detail-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.action-btn {
  display: flex;
  align-items: center;
  color: #666;
  cursor: pointer;
}

.action-btn:hover {
  color: #409eff;
}

.action-btn .icon {
  margin-right: 5px;
}

/* 评论区样式 */
.comments-section {
  margin-top: 30px;
}

.comments-header {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
}

.comment-item {
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.comment-user {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.comment-content {
  padding-left: 45px;
  color: #333;
  font-size: 15px;
}

.comment-actions {
  padding-left: 45px;
  margin-top: 5px;
  display: flex;
  font-size: 13px;
  color: #999;
}

.comment-actions span {
  margin-right: 15px;
  cursor: pointer;
}

.comment-actions span:hover {
  color: #409eff;
}

.comment-form {
  margin-top: 20px;
}

/* 按钮样式 */
.primary-button {
  background-color: #409eff;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.primary-button:hover {
  background-color: #66b1ff;
}

.secondary-button {
  background-color: #f4f4f5;
  color: #606266;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.secondary-button:hover {
  background-color: #e9e9eb;
}

/* 浮动按钮 */
.float-button {
  position: fixed;
  right: 50px;
  bottom: 50px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #409eff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s;
  z-index: 99;
}

.float-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  background-color: #66b1ff;
} 